-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean-up System.Drawing.Common
and remove the Unix code.
#64623
Conversation
Tagging subscribers to this area: @dotnet/area-system-drawing Issue DetailsSince #64084 got merged,
|
Thanks, @teo-tsirpanis -- please let me know when this is ready for review (CI is Red). I'd like to ask if you need any help to get CI green or a review, or just wait? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for offering to help @safern. CI failures are so far unrelated (they occur on non-Windows platforms). I have two questions.
src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj
Outdated
Show resolved
Hide resolved
src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
3f4fe59
to
966d6bd
Compare
@teo-tsirpanis #64500 which got just merged caused a conflict which I just resolved. Hope that's ok. |
Thanks @ViktorHofer. |
2893c32
to
608394e
Compare
CI is green (failures are non-Windows and unrelated). @safern is there anything else to do? This PR is getting more and more conflicts as it stays open. |
4742220
to
055a438
Compare
Conflicts are resolved. |
@dotnet/area-system-drawing as @safern changed teams, this will need a different one of you to sign off. |
055a438
to
ab12cb6
Compare
34379c8
to
1c0ca40
Compare
Great, CI now passes. Can someone review?
|
we will need a new reviewer with Santi gone. |
859bb98
to
91cc086
Compare
No reason to sort them; the list is already unsorted. And rename a remaining formerly Windows-specific file.
22d0776
to
b8d5126
Compare
System.Drawing.Common
.System.Drawing.Common
and remove the Unix code.
src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
src/libraries/System.Drawing.Common/src/System/Drawing/Bitmap.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went over all the changes. This looks REALLY good. Thanks for the great work. The remaining work now is to:
- Switch all the
!!
null checks to their previous state. For most, you could probably useArgumentNullException.ThrowIfNull(myString);
. - Make sure that the remaining questions are answered.
After that we can get the PR merged :)
PS: I hope you don't mind that I pushed one commit to your branch to clean-up the SDC project file further.
a2c09bf
to
435440e
Compare
435440e
to
7eeb1de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congratulations and thank you for your contribution 🎉🎉🎉 We very much appreciate the time and effort that you put into this change.
If you want to pick up another task, there are plenty ones in the backlog that are marked as up-for-grabs. And I will promise that future changes won't take us that long to react and will hopefully cause less merge conflicts (😥) on your side. |
) * Remove all Unix-specific files. * Throw PNSE on non-Windows. * Merge the Windows-specific files into their formerly cross-platform counterparts. * Remove all mentions of Unix in the tests. * Remove two always-on defines. * Merge two item groups in the project file. No reason to sort them; the list is already unsorted. And rename a remaining formerly Windows-specific file. * Remove the NoCOMWrappers files. * Fail on unsupported platforms when a library is trying to be loaded. * Fix compile errors. * Small changes in the project file. * Remove two meaningless asserts. * Run BinaryFormatter tests on SDC types only on Windows. * Use `[ThreadStatic]` in Gdip.ThreadData. * Remove `TargetsAnyOS`. Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com> * SDC project file clean-up * Remove `!!` from System.Drawing.Common. Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
I also wanted to add my belated thanks here @teo-tsirpanis. This was a lot of work. |
Since #64084 got merged,
System.Drawing.Common
is supported only on Windows. This PR actually removes all Unix-specific code and tests, and merges the.Windows.cs
files into their formerly cross-platform counterparts, drastically simplifying the codebase.I also cleaned-up the code a little bit (used a
[ThreadStatic]
instead of a named data slot, and removed unused files).